const path = require('path')
const {
	CleanWebpackPlugin
} = require('clean-webpack-plugin');
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
module.exports = {
	mode: 'development',
	entry: {
		app: './src/main.js',
	},
	output: {
		filename: 'bundle.js',
		path: path.join(__dirname, 'dist')
	},
	resolve: {
		extensions: ['.js', '.vue', '.json'],
	},
	module: {
		rules: [{
			test: /\.(png|jpg|gif|svg|ttf|eot|woff|woff2)$/,
			loaders: [{
				loader: 'url-loader',
				options: {
					limit: 20 * 1024
				}
			}]
		}, ]
	},
	plugins: [
		new CleanWebpackPlugin(),
		new ExtractTextPlugin("styles.css"),
	]
}
